#ifndef _FocObserver_H
#define _FocObserver_H
#include "PIController.h"
typedef struct
{
		float alphaCurreantHat,betaCurreantHat;
		float alphaErr,betaErr;
		float A,B;
		float alphaEMF,betaEMF;
		float alphaZ,betaZ;
		float h,lpfK;
		float pllKp,pllKi;
		float filterBuff[50],sum,outOmega;
		short idx;
		float period;
		float sin_cos[2];
		float oemga,theta;
		PIController_t pi;
}ObserverSmc_t;


typedef struct
{
	float zAlphaHat,zBetaHat,eAlphaHat,eBetaHat;
	float h,A,B;
	float omega;
	float theta;
	float sin_cos[2];
	short idx;
	float pllKp,pllKi;
	float filterBuff[50],sum,outOmega;
	float thetaDiff;
	PIController_t pi;
}ObserverLuenberger_t;
void ObserverSmcInit(ObserverSmc_t* pHandle);
void ObserverLuenbergerInit(ObserverLuenberger_t *observer);
void ObserverSmcStep(ObserverSmc_t* pHandle,float vAlpha,float vBeta,float realAlphaCurrent,float realBetaCurrent);
void ObserverLuenbergerStep(ObserverLuenberger_t *observer,float vAlpha,float vBeta,float realAlphaCurrent,float realBetaCurrent);
#endif
